package com.lzyyj.gmis.base.model;

import java.io.Serializable;

import com.lzyyj.gmis.base.model.IUser;

public class UserVo<PK extends Serializable> implements IUser<PK> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3646161210925222118L;
	
	private PK id;
	private String loginName;
	private String name;
	private String password;
	
	public UserVo(){
	}
	
	public UserVo(String loginName){
		this.loginName = loginName;
	}
	
	public UserVo(String loginName,String password){
		this.loginName = loginName;
		this.password = password;
	}
	
	@Override
	public PK getId() {
		return id;
	}

	@Override
	public void setId(PK id) {
		this.id = id;
	}

	@Override
	public String getLoginName() {
		return loginName;
	}

	@Override
	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	@Override
	public String getName() {
		if (name==null){
			return loginName;
		}
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String getPassword() {
		return this.password;
	}

	@Override
	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public boolean validatePassword(String password) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public void updatePassword(String password) {
		// TODO Auto-generated method stub
		
	}
	
}
